﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraWaitForm;

namespace DataExporter
{
    public partial class WaitForm2 : WaitForm
    {
        public WaitForm2()
        {
            InitializeComponent();
        }

        #region Overrides

        public override void SetCaption(string caption)
        {
            base.SetCaption(caption);
        }
        public override void SetDescription(string description)
        {
            base.SetDescription(description);
        }
        public override void ProcessCommand(Enum cmd, object arg)
        {
            base.ProcessCommand(cmd, arg);
            switch ((WaitFormCommand)cmd)
            {
                    case WaitFormCommand.UpdateProgress:
                    var progress = (ExportDataProgress) arg;
                    progressBarControl1.EditValue = progress.Percentage;
                    labelControl1.Text = progress.Text;
                    break;
            }
        }

        #endregion

        public enum WaitFormCommand
        {
            UpdateProgress
        }

        private void WaitForm2_Load(object sender, EventArgs e)
        {

        }
    }
}